then set the hilite of cd btn id (item 1 of cd field id 99) to false
put "" into cd field id 99
menuHandler "delete","Editor"
menuHandler "delete","Commands"
menuHandler "delete","Insert Control..."
if the freesize of this stack > 25000 then domenu "compact stack"
global User_level
set the userlevel to User_level
show menubar
end CloseStack
Function lineClicked
return (trunc(((scroll of the target) + (item two of the clickloc) - (item two of the rect of the target)) div the textheight of the target) + one)
end lineClicked
function realName fichier
put "" into applName
repeat with x = the number of chars in fichier down to 1
if char x of fichier = ":" then
exit repeat
else
put char x of fichier before applName
end if
end repeat
return applName
end realname
Function theLineClicked clickLic
return (trunc(((scroll of cd field "survey") + (item two of clickLic) - (item two of the rect of cd field "survey")) div the textheight of cd field "survey") + one)
end theLineClicked
function compute name,tType,text,length,branch
global commandLIST
put "" into displayString
put "0,5,6,8,18,37,38,43,44,45,46" into exceptions
repeat with x = 1 to 11
if tType = item x of exceptions then
put line (tType+1) of commandLIST into displayString
if name ≠ "" then
put " •" && name && "•" after displayString
end if
return displayString
exit compute
end if
end repeat
if tType = 1 then
if length = 0 then
put "Display “" & text & "” with a CR" after displayString
else
put "Display “" & text & "” with no CR" after displayString
end if
end if
if tType = 2 then
put "Branch immediately to “" & branch & "”" into displayString
end if
if tType = 3 then
put "If last input contains “" & text & "”, branch to “" & branch & "”" into displayString
end if
if tType = 4 then
put "If last input was empty, branch to “" & branch & "”" into displayString
end if
if tType = 7 then
put "Stop execution of the Survey file and return to the last " & "Red Ryder Host menu." into displayString
end if
if tType = 9 then
put "Get input [" & length & "] from the user." into displayString
if text ≠ "" then
put "Display “" & text & "” and " before displayString
end if
end if
if tType = 10 then
put "Get 'Y' or 'N' from the user." into displayString
if text ≠ "" then
put "Display “" & text & "” and " before displayString
end if
end if
if tType = 11 then
put "Get a CR from the user." into displayString
if text ≠ "" then
put "Display “" & text & "” and " before displayString
end if
end if
if tType = 12 then
put "Display “" & text & "” with CR to the scratch file." into displayString
end if
if tType = 13 then
put "Display “" & text & "” with no CR to the scratch file." into displayString
end if
if tType = 14 then
put "Raise current caller's time limit for this call only to " & length into displayString
end if
if tType = 15 then
put "Raise current caller's time limit permanently to " & length into displayString
end if
if tType = 16 then
put "Set the caller's clearance level for this for this call only to " & length into displayString
end if
if tType = 17 then
put "Set the caller's clearance level permanently to " & length into displayString
end if
if tType = 19 then
put "Write the value of ASCII character “" & text & "” to the response file." into displayString
end if
if tType = 20 then
put "Clear out the scratch file and branch to “" & branch & "”" into displayString
end if
if tType = 21 then
put "If the user's down/upload ratio is less than " & text & ", then branch to “" & branch & "”" into displayString
end if
if tType = 22 then
put "Temporarily sets the current caller's restriction flag " & "number " & text into displayString
end if
if tType = 23 then
put "Permanently sets the current caller's restriction flag " & "number " & text into displayString
end if
if tType = 24 then
put "Temporarily resets the current caller's restriction flag " & "number " & text into displayString
end if
if tType = 25 then
put "Permanently resets the current caller's restriction flag " & "number " & text into displayString
end if
if tType = 26 or tType = 27 or tType = 28 or tType = 29 then
put "Display TEXT file “" & realName(text) into displayString
if tType = 26 then put "” (Cancellable, no prompts)" after displayString
if tType = 27 then put "” (Cancellable, all prompts)" after displayString
if tType = 28 then put "” (Not cancellable, all prompts)" after displayString
if tType = 29 then put "” (Cancellable, only final prompts)" after displayString
end if
if tType = 30 then
put "Create a Special Scratch File and allocate " & text & " accumulators."into displayString
end if
if tType = 31 then
put "Add " & item 1 of text & " to the Special Scratch File " & "accumulator " & item 2 of text into displayString
end if
if tType = 32 then
put "Add the contents of Special Scratch accumulator " & item 1 of text & " to the Special Scratch File " & "accumulator " & item 2 of text into displayString
end if
if tType = 33 then
put "Display the string equivalent of the Special Scratch file " & "accumulator " & text & " with a CR." into displayString
end if
if tType = 34 then
put "Display the string equivalent of the .CNT file " & "accumulator " & text & " with a CR." into displayString
end if
if tType = 35 then
put "Display the string equivalent of the Special Scratch file " & "accumulator " & text & " with no CR." into displayString
end if
if tType = 36 then
put "Display the string equivalent of the .CNT file " & "accumulator " & text & " with no CR." into displayString
end if
if tType = 39 then
put "If current caller's name appears in .CNT file, execute " & "the survey: “" & realName(branch) & "”." into displayString
end if
if tType = 40 then
put "Put " & item 2 of text & " into the Special " & "Scratch accumulator " & item 1 of text into displayString
end if
if tType = 41 then
put "Display the percentage that .CNT file accumulator " & item 1 of text & " is of .CNT file acc. " & item 2 of text & " with a CR." into displayString
end if
if tType = 42 then
put "Display the percentage that .CNT file accumulator " & item 1 of text & " is of .CNT file acc. " & item 2 of text & " with no CR." into displayString
end if
if name ≠ "" then
put " •" && name && "•" after displayString
end if
return displayString
end compute
on command commandNumber,displayString
put return into r
lock screen
if commandNumber = 0 then
put "" & r & "" & r & "0" & r & "" & r & "" & r & "" into command
WRTstrg command,displayString, line 1 of cd field "action",line 2 of cd field "action"
exit command
end if
if commandNumber = 1 then
go cd "input"
initiate true,"Label:",false,"",false,"",true, "Text to display...",true,false,1,displayString